﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ProductTool.Tools
{
    class PageHelper
    {
        public static Tuple<int,int> getPageIndex(int pageIndex,int pageSize)
        {
            int startIndex = (pageIndex- 1) * pageSize+1;
            int endIndex = startIndex+ pageSize-1;
            Tuple<int, int> result = new Tuple<int, int>(item1: startIndex, item2: endIndex);           
            return result;
        }
    }
}
